package com.ayongw.mobile.greenphone;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

public class MainActivity extends AppCompatActivity {
    public static final String TAG = "Main Activity";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.i(TAG, "启动主页面！");
        setContentView(R.layout.activity_main);

        startPhoneService();
    }

    private void startPhoneService() {
        Intent intent  = new Intent(MainActivity.this, PhoneActionService.class);
        Log.i(TAG, "准备启动监听服务！");
        startService(intent);
    }
}
